//********************************************************************************************************************//
//ORGANIZATION:
//AUTHOR: bpeng(bogers.peng@gmail.com)
//SUMMARY:
//********************************************************************************************************************//
#include "../Collection.h"

using namespace Native::System;

CCollection::CCollection()
{
}

CCollection::CCollection(C_COLLECTION& that)
{
}

CCollection::CCollection(C_COLLECTION&& that)
{
}

CCollection::~CCollection()
{
}

size_t CCollection::Count() const
{
    throw CAbstractMethodException(NATIVE_SCENE(L"Count"));

    return 0;
}

bool CCollection::Empty() const
{
    throw CAbstractMethodException(NATIVE_SCENE(L"Empty"));

    return true;
}

void CCollection::Clear()
{
    throw CAbstractMethodException(NATIVE_SCENE(L"Clear"));
}
//********************************************************************************************************************//
//CEmptyCollectionException
//********************************************************************************************************************//
void CEmptyCollectionException::Check(
    C_SCENE& scene,
    C_COLLECTION& collection,
    WSTRING& arguments,
    WSTRING& detail) throw()
{
    if (collection.Empty()) {
        throw CEmptyCollectionException(scene, arguments, detail);
    }
}

CEmptyCollectionException::CEmptyCollectionException()
{
}

CEmptyCollectionException::CEmptyCollectionException(C_EMPTY_COLLECTION_EXCEPTION& that)
    :CException(that)
{
}

CEmptyCollectionException::CEmptyCollectionException(C_EMPTY_COLLECTION_EXCEPTION&& that)
    :CException(that)
{
}

CEmptyCollectionException::CEmptyCollectionException(
    C_SCENE& scene,
    WSTRING& arguments,
    WSTRING& detail)
{
    Append(CCase(scene, L"Aggregator is empty", arguments, detail));
}